package secondStage.part2.内部类.one;

/**
 * @ClassName: [Outer]
 * @Description: 外部类
 * @Author: [黄劲松]
 * @CreateDate: [2021-03-21]
 * @Version: [v1.0]
 */
public class Outer {//外部类
    private int num = 100;

    public class Inter {//内部类

        public void show() {
            System.out.println("访问外部类成员：" + num);
        }
    }

    public void method() {
//        show();//报错
        Inter i = new Inter();//外部类中创建对象访问内部类方法
        i.show();
    }
}
